<?php
/**
 * User: hjd-yao
 * Date: 2019/4/26
 * Time: 16:00
 */
Route::get('/')->uses('StoreController@stores')->name('b_Store_stores');

Route::get('closed-stores')->uses('StoreController@closedStores')->name('b_Store_closedStores');

Route::match(['post','get'],'add')->uses('StoreController@create')->name('b_Store_create');

Route::match(['post','get'],'edit/{store_id}')->uses('StoreController@update')->name('b_Store_update')
    ->where('store_id','[0-9]+');

Route::get('info/{store_id}')->uses('StoreController@detail')->name('b_Store_detail')
    ->where('store_id','[0-9]+');

Route::delete('remove/{store_id}')->uses('StoreController@delete')->name('b_Store_delete')
    ->where('store_id','[0-9]+');

Route::get('batch-remove')->uses('StoreController@batchDelete')->name('b_Store_batchDelete');

Route::post('close')->uses('StoreController@closeStore')->name('b_Store_closeStore');

Route::post('open')->uses('StoreController@openStore')->name('b_Store_openStore');

Route::prefix('order')->group(function (){
    Route::get('/')->uses('StoreOrderController@storeOrders')->name('b_ShopOrder_storeOrders');
});

Route::prefix('wd')->group(function (){
    Route::get('record')->uses('StoreWdController@wdRecord')->name('b_StoreWd_wdRecord');

    Route::get('apply')->uses('StoreWdController@wdApply')->name('b_StoreWd_wdApply');

    Route::get('detail/{wd_id}')->uses('StoreWdController@wdDetail')->name('b_StoreWd_wdDetail')
        ->where('wd_id','[0-9]+');

    Route::match(['post','get'],'remove')->uses('StoreWdController@wdDelete')->name('b_StoreWd_wdDelete');

    Route::match(['post','get'],'agree/{wd_id}')->uses('StoreWdController@wdAgree')->name('b_StoreWd_wdAgree')->where('wd_id','[0-9]+');

    Route::post('refuse/{wd_id}')->uses('StoreWdController@wdRefuse')->name('b_StoreWd_wdRefuse')->where('wd_id','[0-9]+');
});